package com.gr.dmbackend.controller.dormaddmin;

import com.alibaba.fastjson.JSONObject;
import com.gr.dmbackend.service.dormaddmin.AddEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class AddEventController {

    @Autowired
    private AddEventService addEventService;

    @PostMapping("/api/dormaddmin/add-event")
    public JSONObject addEvent(@RequestParam Map<String, String> data){
        return addEventService.addEvent(data);
    }

}
